{{define "base/edit_form"}}
    <form method="post" class="layui-form layui-form-pane admin-edit-form" id="edit_form" lay-filter="edit-form">
        {{range $key, $fieldName := .ModelPage.Items}}
        {{$field := index $.ModelPage.Fields $fieldName}}
            <div class="layui-form-item {{if eq $field.Widget  "textarea"}}layui-form-text{{end}}"
                 {{if eq $field.Widget "radio" "checkbox"}}pane{{end}}>
                <label class="layui-form-label">
                    {{if $field.Verify}}<em>*</em>{{end}}
                    {{$field.Title}}
                </label>
                <div class="layui-input-block">
                    {{$field.WidgetHtml | Html}}
                </div>
                {{ if $field.Info}}
                    <div class="layui-input-block"><div class="layui-form-mid layui-word-aux">{{$field.Info}}</div></div>
                {{end}}
            </div>

        {{ end }}
    </form>
    <script>
        layui.use(['admin','form'],function(){
            layui.admin.global.editFormId = "edit_form"; //表示编辑表单的ID
            layui.admin.renderXmSelect('#edit_form');
            layui.admin.renderDate('#edit_form');
            layui.form.render(null, 'edit-form');
        });
    </script>
{{end}}